<?php
/**
 * An interface that every module must implement
 *
 * @author Ishtiaque Shahrier <md.ishtiaque@newgenbd.net>
 * @package core
 * @subpackage libraries
 */
interface i_module_base {
    /**
     * Get the description of the module
     *
     * @return string
     */
    public function get_description();
    /**
     * Get the name of the module.
     *
     * if the real_name that is file name is "core_u_module.php"
     * then the get_name should be "core" in the modules table during
     * installation.
     *
     * @return string
     */
    public function get_name();
    /**
     * Returns the name of the module with _u_ part.
     *
     * Real name is basically the file name.
     *
     * @return string
     */
    public function get_real_name();
    /**
     * Get the latest available version of the module.
     *
     * @todo this shold come from newgenbd server
     * @return string
     */
    public function get_current_version();
    /**
     * Get the currently installed version of the module
     *
     * @return string
     */
    public function get_installed_version();
    /**
     * Get list of dependent modules
     * @todo NOT IMPLEMENTED YET
     * @return array
     */
    public function get_dependency();
    /**
     * Get the settings for the module
     * Returns std object if theres no settings for the module or settings_m_core class
     * @return object
     */
    public function get_settings();
    /**
     * Get specific setting for the module
     * @param string $name name of the settings exactly in the database table
     * @return NULL|string null if the setting does not exist
     */
    public function get_setting($name);

    /**
     * Are you in the  admin section of the current module??
     * Returns TRUE if yes else FALSE
     * @return bool
     */
    public function is_admin();

    
}

?>
